package com.wxxymakers.cklabrecruit.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wxxymakers.cklabrecruit.entity.enum_.Group;
import com.wxxymakers.cklabrecruit.entity.enum_.RegStatus;
import com.wxxymakers.cklabrecruit.entity.enum_.Sex;
import io.github.biezhi.excel.plus.annotation.ExcelField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
@Data
public class RegisterInfo implements Serializable {
    public RegisterInfo() {}
    public RegisterInfo(RegStatus status) {
        this.status = status;
    }

    private Integer id;

    @ExcelField(order = 0, columnName = "姓名")
    private String name;

    @ExcelField(order = 1, columnName = "性别", convertType = Sex.SexConverter.class)
    private Sex sex;

    @ExcelField(order = 2, columnName = "学号")
    private String stuId;

    @ExcelField(order = 3, columnName = "班级")
    private String grade;

    @ExcelField(order = 4, columnName = "意向", convertType = Group.GroupConverter.class)
    private Group group;

    @ExcelField(order = 5, columnName = "状态", convertType = RegStatus.RegStatusConverter.class)
    private RegStatus status;

    private String qq;

    @ExcelField(order = 6, columnName = "电话号码")
    private String tel;

    @ExcelField(order = 7, columnName = "邮箱")
    private String email;

    @ExcelField(order = 8, columnName = "时间", datePattern = "yyyy年MM月dd日 HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy")
    private Date datetime;

    @ExcelField(order = 9, columnName = "个人简介")
    private String intro;

    private static final long serialVersionUID = 1L;
}